package com.gitee.zeric.codec.util;

import com.gitee.zeric.codec.exception.ParamErrorException;

/**
 * @author zj
 * @date 2021/12/24
 */
public class VUtils {
    /**
     *  如果参数为true抛出异常
     *
     * @param b
     * @return com.example.demo.func.ThrowExceptionFunction
     **/
    public static ThrowExceptionFunction isTure(boolean b){

        return (errorMessage) -> {
            if (b){
                throw new ParamErrorException(errorMessage);
            }
        };
    }

}
